package com.shanzmoo.db.picture.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.shanzmoo.db.picture.entity.MallBannerPictureEntity;
import com.shanzmoo.db.picture.mapper.MallBannerPictureMapper;
import com.shanzmoo.db.picture.service.IMallBannerPictureService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 商城banner图 服务实现类
 * </p>
 *
 * @author Xueqz
 * @since 2020-12-20
 */
@Service
public class MallBannerPictureServiceImpl extends ServiceImpl<MallBannerPictureMapper, MallBannerPictureEntity> implements IMallBannerPictureService {

    @Override
    public List<MallBannerPictureEntity> getBannerList() {
        return baseMapper.selectList(new QueryWrapper<MallBannerPictureEntity>()
                .eq("deleted", false));
    }

    @Override
    public void addBanner(MallBannerPictureEntity mallBannerPictureEntity) {
        baseMapper.insert(mallBannerPictureEntity);
    }
}
